define(
    ["./../math/GLMatrix"],
    function() {
        return {
            create	: function() {
                var _perspective= mat4.create();
                var _view       = mat4.create();
			
                var _self = {
                    pos     : vec3.create([0,0,200]),
                    target  : vec3.create([0,0,0]),
                    up      : vec3.create([0,1,0]),
                    fov     : 45,
                    near    : 0.1,
                    far     : 1000,
                    aspect  : 640/480,
                    forward : vec3.create([0,0,0]),
                    right   : vec3.create([0,0,0]),
                    update  : function() {
                        mat4.perspective(this.fov, this.aspect, this.near, this.far, _perspective);
                        mat4.lookAt(this.pos, this.target, this.up, _view);
                        vec3.subtract(this.target, this.pos, this.forward);
                        vec3.normalize(this.forward);
                        vec3.cross(this.up, this.forward, this.right);
                        vec3.normalize(this.right);
                    },
                    getView : function() {
                        return _view;
                    },
                    getPerspective : function() {
                        return _perspective;
                    }
                };

                return _self;
            }
        };
    }
    );